/*
 * Validity.java
 *
 * Created on March 11, 2005, 4:15 PM
 */

package org.infoset.xml;

import java.util.*;

/**
 *
 * @author R. Alexander Milowski
 */
public interface Validity extends Typed
{

   /**
    * The item is invalid.
    */
   final int INVALID = 0;
   /**
    * The item is valid.
    */
   final int VALID = 1;
   /**
    * It is not known whether the item is valid or invalid.
    */
   final int NOT_KNOWN = 2;

   /**
    * Gets the validity.
    */
   int getValidity();
   
   /**
    * Validation was not attempted.
    */
   final int ATTEMPTED_NONE = 0;
   /**
    * Validation was attemted for all descendants.
    */
   final int ATTEMPTED_FULL = 1;
   /**
    * Validation was attempted only when there are appropriate declarations.
    */
   final int ATTEMPTED_PARTIAL = 2;
   
   int getValidationAttempted();
   
   /**
    * Sets the validity and validation attempted.
    * @param validity One of the values VALID, INVALID, or NOT_KNOWN
    * @param attempted One of the values ATTEMPTED_NONE, ATTEMPTED_FULL, or ATTEMPTED_PARTIAL
    */
   void setValidity(int validity, int attempted); 

   Iterator getErrors();
   
   void setErrors(List errorStringList);
   
   void addError(String error);

}
